import axios from 'axios'

const server = axios.create({
  timeout: 3000
})

server.interceptors.request.use(
  (config) => {
    return config
  },
  (err) => Promise.reject(err)
)

server.interceptors.response.use(
  (response) => {
    return response.data
  },
  (err) => Promise.reject(err)
)

export default server
